namespace AccordTrainer
{
    public class Quality
    {

        public int TrueNegative { get; set; }

        public int TruePositive { get; set; }

        public int FalseNegative { get; set; }

        public int FalsePositive { get; set; }

        public double Threshold { get; set; }

        public double Precision { get { return TruePositive * 1.0 / (TruePositive + FalsePositive); } }

        public double Recall { get { return TruePositive * 1.0 / (TruePositive + FalseNegative); } }

        public double FMeasure()
        {
            return 2 * Precision * Recall / (Precision + Recall);
        }
    }
}